package file;

import java.io.File;
import java.io.FileFilter;

public class Test2 {
    public static void main(String[] args) {
        File file=new File("./");
//        FileFilter filter=new FileFilter() {
//            public boolean accept(File pathname) {
//                return pathname.getName().contains("s");
//            }
//        };

        File[] subs=file.listFiles(f->f.getName().contains("s"));
        for (File sx:subs){
            System.out.println(sx);
        }
    }
}
